package com.syq;

import java.util.function.BiConsumer;
import java.util.function.Consumer;

/**
 * @author Sun Yueqi
 * @version 1.00
 * @time 2022/6/8 19:01
 */
public class TestConsumer {
    public static void main(String[] args) {
//        Consumer consumer=new Consumer() {
//            public void accept(Object o) {
//                System.err.println(o);
//            }
//        };
//        consumer.accept("abc");
//      Consumer consumer = s->System.err.println(s);
        Consumer consumer = System.err::println;
        consumer.accept("abc");

        Consumer<String> consumer1 = System.err::println;
        consumer1.accept("123546");

        BiConsumer<String,Integer> biConsumer=(first,second)->{
            System.err.println(first + "" + second);
        };
        biConsumer.accept("abc",123);
    }
}
